package itbour.onetouchshow.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.List;

/**
 * Created by guoh on 2018/3/30.
 * 功能描述：
 * 需要的参数：
 */

public class VipInfoBean implements Serializable {
    public IntroduceInfoBean introduceInfo;
    /**
     * appHomeVipUrl :
     * vipProtocolUrl : /yjx/v1_0_0/user/vipAgreement
     * introduceInfo : {"vipGoods":[{"itemId":30123,"priceId":101,"itemName":"vip 年度会员礼包","itemDesc":"免费使用尊享模板,获赠 30000 秀米","recommend":1,"adImg":{"url":"http://itbour-generate.itbour.com/video/U2/2017/12/05/013653510_mT2i0Ajhkw3p2XLyTmlw/thumb.jpg","w":300,"h":200}}],"bottomImg":{"url":"http://itbour-generate.itbour.com/video/U2/2017/12/05/013653510_mT2i0Ajhkw3p2XLyTmlw/thumb.jpg","w":750,"h":400}}
     */

    private String appHomeVipUrl;
    private String vipProtocolUrl;

    public String getAppHomeVipUrl() {
        return appHomeVipUrl;
    }

    public void setAppHomeVipUrl(String appHomeVipUrl) {
        this.appHomeVipUrl = appHomeVipUrl;
    }

    public String getVipProtocolUrl() {
        return vipProtocolUrl;
    }

    public void setVipProtocolUrl(String vipProtocolUrl) {
        this.vipProtocolUrl = vipProtocolUrl;
    }

    public IntroduceInfoBean getIntroduceInfo() {
        return introduceInfo;
    }

    public void setIntroduceInfo(IntroduceInfoBean introduceInfo) {
        this.introduceInfo = introduceInfo;
    }

    public static class IntroduceInfoBean implements Serializable {
        /**
         * vipGoods : [{"itemId":30123,"priceId":101,"itemName":"vip 年度会员礼包","itemDesc":"免费使用尊享模板,获赠 30000 秀米","recommend":1,"adImg":{"url":"http://itbour-generate.itbour.com/video/U2/2017/12/05/013653510_mT2i0Ajhkw3p2XLyTmlw/thumb.jpg","w":300,"h":200}}]
         * bottomImg : {"url":"http://itbour-generate.itbour.com/video/U2/2017/12/05/013653510_mT2i0Ajhkw3p2XLyTmlw/thumb.jpg","w":750,"h":400}
         */

        private BottomImgBean bottomImg;
        private List<VipGoodsBean> vipGoods;

        public BottomImgBean getBottomImg() {
            return bottomImg;
        }

        public void setBottomImg(BottomImgBean bottomImg) {
            this.bottomImg = bottomImg;
        }

        public List<VipGoodsBean> getVipGoods() {
            return vipGoods;
        }

        public void setVipGoods(List<VipGoodsBean> vipGoods) {
            this.vipGoods = vipGoods;
        }

        public static class BottomImgBean implements Serializable {
            /**
             * url : http://itbour-generate.itbour.com/video/U2/2017/12/05/013653510_mT2i0Ajhkw3p2XLyTmlw/thumb.jpg
             * w : 750
             * h : 400
             */

            private String url;
            private int w;
            private int h;

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }

            public int getW() {
                return w;
            }

            public void setW(int w) {
                this.w = w;
            }

            public int getH() {
                return h;
            }

            public void setH(int h) {
                this.h = h;
            }
        }

        public static class VipGoodsBean implements Serializable, Parcelable {
            public static final Parcelable.Creator<VipGoodsBean> CREATOR = new Parcelable.Creator<VipGoodsBean>() {
                @Override
                public VipGoodsBean createFromParcel(Parcel source) {
                    return new VipGoodsBean(source);
                }

                @Override
                public VipGoodsBean[] newArray(int size) {
                    return new VipGoodsBean[size];
                }
            };
            /**
             * itemId : 30123
             * priceId : 101
             * itemName : vip 年度会员礼包
             * itemDesc : 免费使用尊享模板,获赠 30000 秀米
             * recommend : 1
             * adImg : {"url":"http://itbour-generate.itbour.com/video/U2/2017/12/05/013653510_mT2i0Ajhkw3p2XLyTmlw/thumb.jpg","w":300,"h":200}
             */

            private boolean isSelected;
            private int itemId;
            private int priceId;
            private String itemName;
            private String itemDesc;
            private int recommend;
            private AdImgBean adImg;

            public VipGoodsBean() {
            }

            protected VipGoodsBean(Parcel in) {
                this.isSelected = in.readByte() != 0;
                this.itemId = in.readInt();
                this.priceId = in.readInt();
                this.itemName = in.readString();
                this.itemDesc = in.readString();
                this.recommend = in.readInt();
                this.adImg = (AdImgBean) in.readSerializable();
            }

            public boolean isSelected() {
                return isSelected;
            }

            public void setSelected(boolean selected) {
                isSelected = selected;
            }

            public int getItemId() {
                return itemId;
            }

            public void setItemId(int itemId) {
                this.itemId = itemId;
            }

            public int getPriceId() {
                return priceId;
            }

            public void setPriceId(int priceId) {
                this.priceId = priceId;
            }

            public String getItemName() {
                return itemName;
            }

            public void setItemName(String itemName) {
                this.itemName = itemName;
            }

            public String getItemDesc() {
                return itemDesc;
            }

            public void setItemDesc(String itemDesc) {
                this.itemDesc = itemDesc;
            }

            public int getRecommend() {
                return recommend;
            }

            public void setRecommend(int recommend) {
                this.recommend = recommend;
            }

            public AdImgBean getAdImg() {
                return adImg;
            }

            public void setAdImg(AdImgBean adImg) {
                this.adImg = adImg;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeByte(this.isSelected ? (byte) 1 : (byte) 0);
                dest.writeInt(this.itemId);
                dest.writeInt(this.priceId);
                dest.writeString(this.itemName);
                dest.writeString(this.itemDesc);
                dest.writeInt(this.recommend);
                dest.writeSerializable(this.adImg);
            }

            public static class AdImgBean implements Serializable {
                /**
                 * url : http://itbour-generate.itbour.com/video/U2/2017/12/05/013653510_mT2i0Ajhkw3p2XLyTmlw/thumb.jpg
                 * w : 300
                 * h : 200
                 */

                private String url;
                private int w;
                private int h;

                public String getUrl() {
                    return url;
                }

                public void setUrl(String url) {
                    this.url = url;
                }

                public int getW() {
                    return w;
                }

                public void setW(int w) {
                    this.w = w;
                }

                public int getH() {
                    return h;
                }

                public void setH(int h) {
                    this.h = h;
                }
            }
        }
    }
}
